//
//  DBFrameService.h
//  iphone.mobileoa
//
//  Created by 李亚春 on 13-5-23.
//  Copyright (c) 2013年 Epoint. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>
#import "EpointFrameDB.h"

@interface DBFrameService : NSObject

//根据ParentOuGuid获取该部门联系人数据
+(NSMutableArray *)getContactsListByParentGuid:(NSString *)_parentguid;

+(int)getUserCount;

+(int)getOuCount;

//根据关键字查询联系人列表
+(NSMutableArray *)getContactsListByKeyWord:(NSString *)_keyword;

//根据userguid获取用户详情
+(NSMutableDictionary *)getUserDetailByUserguid:(NSString *)_userguid;

//根据parentOuGuid获取子栏目
+(NSMutableArray *)getWebInfoCategoryByParent:(NSString *)parentOuGuid;

//将键值对存储在config表
+(void)setConfigValue:(NSString *)key value:(NSString *)value;

//根据key获取config表存储的值
+(NSString *)getConfigValue:(NSString *)key;

//获取当前用户UserGuid
+(NSString *)getUserGuid;

//根据key获取缓存数据库值
+(NSString *)getCacheValue:(NSString *)key;

//将键值对存储在缓存数据库表
+(void)setCacheValue:(NSString *)key value:(NSString *)value;

+(NSString *)getUserPhontNumber;
+(NSString *)getUserOuguid;

+(NSString *)getSingErrorLog;

//将键值对存储在NSUserDefault
+(void)setUserDefaults:(NSObject*)obj key:(NSString *)key;

//根据Key获取存储在NSUserDefault里的值
+(NSObject *)getUserDefaults:(NSString *)key;

+(NSString *)getUserGuidByLoginId:(NSString *)loginid;
+(NSMutableArray *)getAllUser;

//将字符串加密保存
+(void)setSecurityKey:(NSString *)key Value:(NSString *)value;

//根据key获取加密的value(键值对)
+(NSString *)getSecurityValue:(NSString *)key;

//存储一个二进制
+(NSData *)getConfigBlob:(NSString *)key;

//根据key获取一个二进制
+(void)setConfigBlob:(NSString *)key Value:(NSData *)value;

+(void)deleteFrameCache;

@end
